package com.fanco.learn_datastruct_leetcode.designpattern.visitor.demo2;

/**
 * @author qiaowang 2022/2/21
 * 描述
 */
public class ComputerDisplayVisitor implements ComputerPartVisitor{
    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("访问键盘");
    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println("访问显示器");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("访问鼠标");
    }

    @Override
    public void visit(Computer computer) {
        System.out.println("打开电脑");
    }
}
